package com.lantosec.hmrp.modules.revisit.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.modules.revisit.entity.RevisitConfig;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 回访功能配置 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-30
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="RevisitConfig对象", description="回访功能配置")
public class RevisitConfigVO extends BaseVO<RevisitConfig> {
    private static final long serialVersionUID = 1L;


    public RevisitConfigVO(RevisitConfig entity){
        this.configId = entity.getConfigId();
        this.callDurationStd = entity.getCallDurationStd();
        this.overDays = entity.getOverDays();
        this.revisitDoctor = entity.getRevisitDoctor();
        this.revisitNurse = entity.getRevisitNurse();
        this.deptId = entity.getDeptId();
    }

    @Override
    public RevisitConfig convertToEntity(){
        return new RevisitConfig(this);
    }


    @ApiModelProperty(value = "主键ID")
    @TableId(value = "config_id", type = IdType.AUTO)
    private Integer configId;

    @ApiModelProperty(value = "规定的最短通话时长(单位：秒)")
    private Integer callDurationStd;

    @ApiModelProperty(value = "回访期限(单位：天)")
    private Integer overDays;

    @ApiModelProperty(value = "是否要求医生回访(0否 1是,非强制 2是,强制)")
    private Integer revisitDoctor;

    @ApiModelProperty(value = "是否要求护士回访(0否 1是,非强制 2是,强制)")
    private Integer revisitNurse;

    @ApiModelProperty(value = "部门ID")
    private String deptId;

    @ApiModelProperty(value = "部门名称")
    private String deptName;
}
